package com.lee.test;

import com.lee.config.JpaConfig;
import com.lee.dao.JpaPageRepository;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main1 {

    ApplicationContext context;

    @Before
    public void init() {
        context = new AnnotationConfigApplicationContext(JpaConfig.class);
    }

    @Test
    public void test1() {
        JpaPageRepository jpaPageRepository = context.getBean("jpaPageRepository", JpaPageRepository.class);
        System.out.println(jpaPageRepository.count());


    }
}
